angular.module('app.baseinfo')

    .factory('emailService', ["$http", "config", function ($http, config) {

        var baseUrl = config.baseUrl;

        var ret = {};

        ret.getMailsettings=function(){
            var url=baseUrl+"/mailsettings";
            return $http.get(url);
        };

        ret.updateMailsettings=function(email){
            var url=baseUrl+"/mailsettings";
            return $http.post(url, email);
        };

        ret.mailTest=function(email){
            var url=baseUrl+"/mailtest";
            return $http.post(url, email);
        };

        return ret;
    }]);